Show:

Streams related Class

Renders a bunch of Stream/preview tools for streams related to the given stream. Has options for adding new related streams, as well as sorting the relations, etc. Also can integrate with Q/tabs tool to render tabs "related" to some category.

Constructor

Methods

elementForStream

(
  • publisherId
  • streamName
  • streamType
  • weight
  • options
)
HTMLElement

You don't normally have to call this method, since it's called automatically. Sets up an element for the stream with the tag and toolName provided to the Streams/related tool. Also populates "publisherId", "streamName" and "related" options for the tool.

Parameters:

  • publisherId String
  • streamName String
  • streamType String
  • weight Number

    The weight of the relation

  • options Object

    The elements of the tools representing the related streams

Returns:

HTMLElement:

An element ready for Q.activate

integrateWithTabs

(
  • elements
)

You don't normally have to call this method, since it's called automatically. It integrates the tool with a Q/tabs tool on the same element or a parent element, turning each Streams/preview of a related stream into a tab.

Parameters:

  • elements Object

    The elements of the tools representing the related streams

refresh

(
  • onUpdate
)

Call this method to refresh the contents of the tool, requesting only what's needed and redrawing only what's needed.

Parameters:

  • onUpdate Function

    An optional callback to call after the update has completed. It receives (result, entering, exiting, updating) arguments. The child tools may still be refreshing after this. If you want to call a function after they have all refreshed, use the tool.state.onRefresh event.